package cqut.wys.controller;

import cqut.wys.dto.UserDTO;
import cqut.wys.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author wuyoushan@zbj.com
 * @date 2017/4/19.
 */
@RestController
public class UserController {

    @Autowired
    UserService userService;

    public String getUserName(){
        String userName=userService.getUserName();
        return userName;
    }

    public List<UserDTO> getUserList(){
        List<UserDTO> list=userService.getUserList();
        return list;
    }
}
